home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / gfx / show / gs_src_gs.lha / gs5.03 / gsimage.h < prev    next >
C/C++ Source or Header  |  1996-04-12  |  2KB  |  46 lines

  1. /* Copyright (C) 1992, 1995, 1996 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of Aladdin Ghostscript.
  4.   
  5.   Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  6.   or distributor accepts any responsibility for the consequences of using it,
  7.   or for whether it serves any particular purpose or works at all, unless he
  8.   or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  9.   License (the "License") for full details.
  10.   
  11.   Every copy of Aladdin Ghostscript must include a copy of the License,
  12.   normally in a plain ASCII text file named PUBLIC.  The License grants you
  13.   the right to copy, modify and redistribute Aladdin Ghostscript, but only
  14.   under certain conditions described in the License.  Among other things, the
  15.   License requires that the copyright notice and this notice be preserved on
  16.   all copies.
  17. */
  18.  
  19. /* gsimage.h */
  20. /* Client interface to image painting */
  21. /* Requires gsstate.h */
  22. #include "gsiparam.h"
  23.  
  24. /*
  25.  * The image painting interface uses an enumeration style:
  26.  * the client initializes an enumerator, then supplies data incrementally.
  27.  */
  28. typedef struct gs_image_enum_s gs_image_enum;
  29. gs_image_enum *gs_image_enum_alloc(P2(gs_memory_t *, client_name_t));
  30. /*
  31.  * image_init returns 1 for an empty image, 0 normally, <0 on error.
  32.  * Note that image_init serves for both image and imagemask,
  33.  * depending on the value of ImageMask in the image structure.
  34.  */
  35. int gs_image_init(P4(gs_image_enum *penum, const gs_image_t *pim,
  36.              bool MultipleDataSources, gs_state *pgs));
  37. int gs_image_next(P4(gs_image_enum *penum, const byte *dbytes,
  38.              uint dsize, uint *pused));
  39. /*
  40.  * Return the number of bytes of data per row
  41.  * (per plane, if MultipleDataSources is true).
  42.  */
  43. uint gs_image_bytes_per_row(P1(const gs_image_enum *penum));
  44. /* Clean up after processing an image. */
  45. void gs_image_cleanup(P1(gs_image_enum *penum));
  46.